using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using Sagile.Nepma;

namespace Sagile.Nepma.Test
{
    /// <summary>
    /// Dummy task 1
    /// </summary>
    public class Task1 : TaskBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Task1"/> class.
        /// </summary>
        public Task1() : base("Task1", false, 1)
        {
            Console.WriteLine(this);
            Id = "139C6121-C019-4e36-A66E-1A8EF2298554";
        }

        /// <summary>
        /// Method called by the worker thread. Finished event is called at the end of the method.
        /// </summary>
        protected override void Process()
        {
            OnTaskProgressChanged(0);
            Thread.Sleep(3000);
            OnTaskProgressChanged(25);
            Thread.Sleep(3000);
            OnTaskProgressChanged(50);
            Thread.Sleep(3000);
            OnTaskProgressChanged(75);
            Thread.Sleep(3000);
            OnTaskProgressChanged(100);
            base.Process();
        }
    }
}
